<?php
class GuildFlowerpotInfoVo extends SzAbstractMySqlVo
{

    private $userId;
    private $position;
    private $level;
    private $flowerId;
    private $updateTime;
    private $createTime;
    private $guildId;

    /**
     * Initialize GuildFlowerpotInfoVo.
     *
     * @param $userId
     * @param $position
     * @param $level
     * @param $flowerId
     * @param $updateTime
     * @param $createTime
     * @param $guildId
     * @param boolean $isInsert default false, means for now this vo is initialized not for insert process
     * @return GuildFlowerpotInfoVo
     */
    public function __construct($userId, $position, $level, $flowerId, $updateTime, $createTime, $guildId, $isInsert = false) {
        $this->userId = $userId;
        $this->position = $position;
        $this->level = $level;
        $this->flowerId = $flowerId;
        $this->updateTime = $updateTime;
        $this->createTime = $createTime;
        $this->guildId = $guildId;

        $this->isInsert = $isInsert;
        $this->voClassName = 'GuildFlowerpotInfoVo';
        $this->ormName = 'GuildFlowerpotInfo';
    }

    /**
     * @see SzAbstractVo::toArray
     */
    public function toArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'position' => $this->getPosition(),
            'level' => $this->getLevel(),
            'flowerId' => $this->getFlowerId(),
            'updateTime' => $this->getUpdateTime(),
            'createTime' => $this->getCreateTime(),
            'guildId' => $this->getGuildId(),
        );
    }

    /**
     * @see SzAbstractVo::toEntireArray
     */
    public function toEntireArray($needEncode = false)
    {
        return array(
            'userId' => $this->getUserId(),
            'position' => $this->getPosition(),
            'level' => $this->getLevel(),
            'flowerId' => $this->getFlowerId(),
            'updateTime' => $this->getUpdateTime(),
            'createTime' => $this->getCreateTime(),
            'guildId' => $this->getGuildId(),
        );
    }

    /**
     * @see SzAbstractVo::toPureArray
     */
    public function toPureArray()
    {
        return array(
            $this->getUserId(),
            $this->getPosition(),
            $this->getLevel(),
            $this->getFlowerId(),
            $this->getUpdateTime(),
            $this->getCreateTime(),
            $this->getGuildId(),
        );
    }

    public function getUserId()
    {
        return $this->userId;
    }

    public function setUserId($val)
    {
        $this->saveColumnStatus(0, $this->userId);
        $this->userId = $val;
    }

    public function getPosition()
    {
        return $this->position;
    }

    public function setPosition($val)
    {
        $this->saveColumnStatus(1, $this->position);
        $this->position = $val;
    }

    public function getLevel()
    {
        return $this->level;
    }

    public function setLevel($val)
    {
        $this->saveColumnStatus(2, $this->level);
        $this->level = $val;
    }

    public function getFlowerId()
    {
        return $this->flowerId;
    }

    public function setFlowerId($val)
    {
        $this->saveColumnStatus(3, $this->flowerId);
        $this->flowerId = $val;
    }

    public function getUpdateTime()
    {
        return $this->updateTime;
    }

    public function setUpdateTime($val)
    {
        $this->saveColumnStatus(4, $this->updateTime);
        $this->updateTime = $val;
    }

    public function getCreateTime()
    {
        return $this->createTime;
    }

    public function setCreateTime($val)
    {
        $this->saveColumnStatus(5, $this->createTime);
        $this->createTime = $val;
    }

    public function getGuildId()
    {
        return $this->guildId;
    }

    public function setGuildId($val)
    {
        $this->saveColumnStatus(6, $this->guildId);
        $this->guildId = $val;
    }

    public function updateLevel($val)
    {
        $this->saveColumnStatus(2, $this->level);
        $this->level += $val;
    }

}